<template>
  <div>
    <el-pagination
        layout="prev, pager, next,jumper,total"
        :default-page-size="paging.size"
        :total="paging.total"
        v-model:current-page="paging.currentPage"
        @currentChange="handleCurrentChange"
        :hide-on-single-page="true"
    />
  </div>
</template>

<script setup>
import {ref} from "vue";
import {useArticleStore} from "@/store/articleStore.js";
import {storeToRefs} from "pinia";
import router from "@/router/router.js";
import {useRoute} from "vue-router";

const articleStore = useArticleStore();
const route = useRoute();
//分页对象
let {paging} = storeToRefs(articleStore);
const handleCurrentChange = async () => {
  let res =await articleStore.getArticleList(paging.value.currentPage);
}
</script>

<style lang="scss" scoped>

</style>